<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <link href="css/mui.min.css" rel="stylesheet"/>
	<link rel="stylesheet" type="text/css" href="css/iconfont.css"/>
	<link rel="stylesheet" type="text/css" href="css/business/index.css"/>
</head>
<body>
	<div class="mui-content" id="mui-content" v-clock>
		<div class="index-top-wrapper">
			<div @tap="logout">
				<span class="index-top-user"  ></span>
				<span class="index-top-user-name">{{userName}}</span>
				<!-- <span class="index-top-user-name">董二千</span> -->
			</div>
			<div class="index-top-operation">
				<div class="index-top-op-item" @tap="openBarcode">
					<span class="mui-icon iconfont icon-scan"></span>
					<span class="mui-tab-label">扫一扫</span>
				</div>
				<div class="index-top-op-item" @tap="recordEvent" v-if="role=='1' || role=='2'">
					<span class="mui-icon iconfont icon-shijiangongdanguanli"></span>
					<span class="mui-tab-label">事件上报</span>
				</div>
				<div class="index-top-op-item" @tap="recordDemand" v-if="role=='2' || role=='3'">
					<span class="mui-icon iconfont icon-fabuxuqiu"></span>
					<span class="mui-tab-label">需求上报</span>
				</div>
				<div class="index-top-op-item" @tap="queryData">
					<span class="mui-icon iconfont icon-icon-chaxun"></span>
					<span class="mui-tab-label">查询</span>
				</div>
			</div>
		</div>
		
		<div class="index-bottom-wrapper">
			<div class="index-todo-wrapper" v-if="todoItemLength">
				<span class="index-todo-txt" >{{"待办事项(" + todoItemLength +")"}}</span>
				<div class="index-todo-items-wrapper">
					<div class="index-todo-item" v-for="item in todoItemsHitchData" v-show="todoItemsHitchData.length > 0" @tap="toEvent(item)">
						<span class="todo-item-state">{{item.equipmentid ? "固定资产故障" : "事件"}}</span>
						<!-- <span class="index-todo-item-txt" v-if="item.zcbh">{{ "资产编号：" + item.zcbh }}</span> -->
						<span class="index-todo-item-txt">{{ "故障类型：" + item.type}}</span>
						<span class="index-todo-item-txt">{{ "部门：" + item.depart}}</span>
						<span class="index-todo-item-txt">{{ "上报日期：" + item.recorddate.split('T')[0]}}</span>
					</div>
					<div class="index-todo-item" v-for="item in todoItemsMaintainData" v-show="todoItemsMaintainData.length > 0" @tap="toMaintain(item)">
						<span class="todo-item-state">固定资产维修</span>
						<!-- <span class="index-todo-item-txt">{{ "资产编号：" + item.zcbh}}</span> -->
						<span class="index-todo-item-txt">{{ "设备状态：" + item.state}}</span>
						<span class="index-todo-item-txt">{{ "鉴定人：" + item.surveyor}}</span>
						<span class="index-todo-item-txt">{{ "上报日期：" + item.recorddate.split('T')[0]}}</span>
					</div>
					<div class="index-todo-item" v-for="item in todoItemsDemandData" v-show="todoItemsDemandData.length > 0" @tap="toDemand(item)">
						<span class="todo-item-state">新需求</span>
						<span class="index-todo-item-txt">{{ "需求类型：" + item.type}}</span>
						<span class="index-todo-item-txt">{{ "需求人：" + item.demander}}</span>
						<span class="index-todo-item-txt">{{ "部门：" + item.depart}}</span>
						<span class="index-todo-item-txt">{{ "上报日期：" + item.recorddate.split('T')[0]}}</span>
					</div>
				</div>
			</div>
			<div class="index-todo-wrapper" v-show="todoEventItemsDepartData.length > 0">
				<span class="index-sum-txt">部门事件</span>
				<div class="index-todo-items-wrapper">
					<div class="index-todo-item" v-for="item in todoEventItemsDepartData" >
						<span class="todo-item-state">{{item.equipmentid ? "固定资产故障" : "事件"}}</span>
						<span class="index-todo-item-txt" v-if="item.depart">{{"部门：" + item.depart}}</span>
						<span class="index-todo-item-txt" v-if="item.workshop">{{"车间：" + item.workshop}}</span>
						<span class="index-todo-item-txt">{{"事件类型：" + item.type}}</span>
						<span class="index-todo-item-txt">{{"事件描述：" + item.desc}}</span>
						<span class="index-todo-item-txt">{{"事件计录人：" + item.recorder}}</span>
						<span class="index-todo-item-txt" v-if="item.assistantname">{{"事件协助人：" + (item.assistantname ? item.assistantname : '')}}</span>
						<span class="index-todo-item-txt"  v-if="item.assistant1name">{{"事件协助人1：" + (item.assistant1name ? item.assistant1name : '')}}</span>
					</div>
				</div>
			</div>
			<div class="index-sum-count">
				<span class="index-sum-txt">资产汇总</span>
				<div class="index-chart-wrapper">
					<div class="index-chart-select-wrapper">
						<span class="index-chart-select-item" :class="{'selected-chart-item': isState}"  @tap="changeChart('state')">资产状态</span>
						<span class="index-chart-select-item" :class="{'selected-chart-item': isDepart}"  @tap="changeChart('depart')">所属部门</span>
						<span class="index-chart-select-item" :class="{'selected-chart-item': isType}"  @tap="changeChart('type')">设备类型</span>
					</div>
					<div id="equip-chart" class="equip-chart-box">
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
<script src="js/mui.min.js"></script>
<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
<script src="js/echarts.js" type="text/javascript" charset="utf-8"></script>
<script src="js/echarts.min.js" type="text/javascript" charset="utf-8"></script>
<script src="config.js" type="text/javascript" charset="utf-8"></script>
<script src="js/common.js" type="text/javascript" charset="utf-8"></script>
<script src="js/business/charts.js" type="text/javascript" charset="utf-8"></script>
<script src="js/business/index.js" type="text/javascript" charset="utf-8"></script>
</html>